<%@page import="com.sdry.model.llm.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>膜丝生产线看板</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="${pageContext.request.contextPath }/assets/css/layui.css"  media="all">
	<link rel="stylesheet" href="${pageContext.request.contextPath }/assets/css/toastr.min.css"  media="all">
	
	<script src="${pageContext.request.contextPath }/assets/layui.js" charset="utf-8"></script>
	<script src="${pageContext.request.contextPath }/assets/layui.all.js"></script>
	<script src="${pageContext.request.contextPath }/assets/js/jquery.min.js" charset="utf-8"></script>
	<script src="${pageContext.request.contextPath }/assets/js/toastr.min.js" charset="utf-8"></script>
    <style type="text/css">
    	.font1 {
    		font-family:微软雅黑;
    		font-size:52px;
    		line-height: 110px;
    		color: #ffffff
    	}
    	.font2 {
    		font-family:微软雅黑;
    		font-size:36px;
    		line-height: 80px;
    		color: #ffffff
    	}
    	.font3 {
    		font-family:微软雅黑;
    		font-size:36px;
    		line-height: 80px;
    	}
    	/* 设置表头 */
		#table1 tr .headTd {
			background-color: #4472C4;
			color: #4472c4;
		}
    	
    </style>
	<style>
		#code{
			font-size:26px;
			/* width:400px; */
			display:inline-block;
			height: 600px; 
		}
		#tdd tr td{
			/* border: 45px #06b0de solid; */
			font-size: 18px;
			width: 100px;
			height: 45px;
			border-right: 45px #06b0de solid;
			border-top: 0px #06b0de solid;
			border-left: 0px #06b0de solid;
			border-bottom: 0px #06b0de solid;
		}
		#tdd tr td img{
			height: 101px;
			width: 101px;
			vertical-align: bottom;
		}
		#tdd a{ 
			border:1px solid white;
			display:inline-block;
			/* line-height:0px */
			width: 101px;
		    color: #8a074c;
		    height: 101px;
		}
	</style>
</head>

<%
	User people = (User) request.getSession().getAttribute("currentUser");
    String name = null;
    if(people != null){
      name = people.getUserName();
    }
%>
<script type="text/javascript">
	
	function refresh(){
		window.location.reload();
	}
	setTimeout('refresh()',60000); //指定1分钟刷新一次

	var now = new Date(<%=new java.util.Date().getTime()%>);
	function run() {
		now.setSeconds(now.getSeconds() + 1);
		var day=now.getDate();
		var month=now.getMonth() + 1;
		var year=now.getFullYear();
		var weekday=new Array(7);
		weekday[0]="星期日";
		weekday[1]="星期一";
		weekday[2]="星期二";
		weekday[3]="星期三";
		weekday[4]="星期四";
		weekday[5]="星期五";
		weekday[6]="星期六";
		var b = now.toLocaleTimeString('chinese', { hour12: false });
		document.getElementById('myTime').innerHTML = year + "年" + add0(month) + "月" + add0(day)+"日";
		document.getElementById("time1").innerHTML = b;
		document.getElementById('myWeek').innerHTML = weekday[now.getDay()];
		//console.log(year + "年" + add0(month) + "月" + add0(day)+"日" + b + weekday[now.getDay()])
	}  
	setInterval(function() {run()},1000);
	 
	 function add0(m){
	    	return m<10?'0'+m:m 
	 }
    
	//初始化
	$(function() {
		//年月日+星期
		run();
	})
</script>
<body style="height: 100%;position: absolute;width: 100%;">
   <table id="table1" style="width: 100%; text-align: center;height: 100%;" border="1px solid #000;">
   		<tr height="10%">
   			<td colspan="2" width="25%">
   				<img alt="" src="${pageContext.request.contextPath }/img/logo.png" width="70%">
   			</td>
   			<td colspan="3" class="headTd">
   				<p class="font1">膜丝生产线</p>
   			</td>
   			<td colspan="2" width="25%">
   				<img alt="" src="${pageContext.request.contextPath }/img/logo.png" width="70%">
   			</td>
   			
   		</tr>
   		<tr height="8%">
   			<td colspan="7" style="background-color: #000000b3;color: #000;">
   				<a id="myTime"  class="font2"></a>
   				<a id="time1" class="font2"></a>
   				<a id="myWeek"  class="font2"></a>
   			</td>
   		</tr>
   		<tr style="height: 6%;font-size: 20px;font-weight: 800;color: #fff;background-color: #06b0de;">
   			<td>膜丝类型</td>
   			<td>生产线</td>
   			<td>产品型号</td>
   			<td>计划数量</td>
   			<td>实际数量</td>
   			<td>运行状态</td>
   			<td>报警次数</td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;">
   			<td rowspan="8">热法</td>
   			<td rowspan="2">1</td>
   			<td>PSH2-0960-T-01</td>
   			<td>${c0960_1 * c0960_mNum}</td>
   			<td>${h11 }</td>
   			<td>运行中</td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;">
   			<td>PSH2-0980-T-02</td>
   			<td>${c0980_1 * c0980_mNum}</td>
   			<td>${h12 }</td>
   			<td>运行中</td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;">
   			<td rowspan="2">2</td>
   			<td>PSH2-0960-T-01</td>
   			<td>${c0960_2 * c0960_mNum}</td>
   			<td>${h21 }</td>
   			<td>运行中</td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;">
   			<td>PSH2-0980-T-02</td>
   			<td>${c0980_2 * c0980_mNum}</td>
   			<td>${h22 }</td>
   			<td>运行中</td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;">
   			<td rowspan="2">3</td>
   			<td>PSH2-0960-T-01</td>
   			<td>${c0960_3 * c0960_mNum}</td>
   			<td>${h31 }</td>
   			<td>运行中</td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;">
   			<td>PSH2-0980-T-02</td>
   			<td>${c0980_3 * c0980_mNum}</td>
   			<td>${h32 }</td>
   			<td>运行中</td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;">
   			<td rowspan="2">4</td>
   			<td>PSH2-0960-T-01</td>
   			<td>${c0960_4 * c0960_mNum}</td>
   			<td>${h41 }</td>
   			<td>停机</td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;">
   			<td>PSH2-0980-T-02</td>
   			<td>${c0980_4 * c0980_mNum}</td>
   			<td>${h42 }</td>
   			<td>停机</td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;background-color: #b2b2b2;">
   			<td colspan="3">合计</td>
   			<td>${c0960_1 * c0960_mNum + c0980_1 * c0980_mNum + c0960_2 * c0960_mNum + c0980_2 * c0980_mNum + c0960_3 * c0960_mNum + c0980_3 * c0980_mNum + c0960_4 * c0960_mNum + c0980_4 * c0980_mNum}</td>
   			<td>${h11 + h12 + h21 + h22 + h31 + h32 + h41 + h42}</td>
   			<td></td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;">
   			<td rowspan="4">湿法</td>
   			<td rowspan="2">1</td>
   			<td>PSH1-1060-B-03</td>
   			<td>${c1060_1 * c1060_mNum}</td>
   			<td>${w13 }</td>
   			<td>运行中</td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;">
   			<td>PSH1-1080-C-04</td>
   			<td>${c1080_1 * c1080_mNum}</td>
   			<td>${w14 }</td>
   			<td>运行中</td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;">
   			<td rowspan="2">2</td>
   			<td>PSH1-1060-B-03</td>
   			<td>${c1060_2 * c1060_mNum}</td>
   			<td>${w23 }</td>
   			<td>停机</td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;">
   			<td>PSH1-1080-C-04</td>
   			<td>${c1080_2 * c1080_mNum}</td>
   			<td>${w24 }</td>
   			<td>停机</td>
   			<td></td>
   		</tr>
   		<tr style="height: 5%;font-size: 16px;font-weight: 600;background-color: #b2b2b2;">
   			<td colspan="3">合计</td>
   			<td>${c1060_1 * c1060_mNum + c1080_1 * c1080_mNum + c1060_2 * c1060_mNum + c1080_2 * c1080_mNum}</td>
   			<td>${w13 + w14 + w23 + w24}</td>
   			<td></td>
   			<td></td>
   		</tr>
   </table>
</body>
</html>